From d920d145fb661f19893ad18cd1e3dedc47cd8c6f Mon Sep 17 00:00:00 2001 From: oliskoli Date: Sat, 20 Sep 2008 20:07:29 +0000 Subject: [PATCH] Rename format "geotagger" as "jtr". --- Makefile.in | 6 +++--- geotagger.c => jtr.c | 44 ++++++++++++++++++++++---------------------- vecs.c | 4 ++-- 3 files changed, 27 insertions(+), 27 deletions(-) rename geotagger.c => jtr.c (89%) diff --git a/Makefile.in b/Makefile.in index bb0b9b504..d74460ea8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -60,7 +60,7 @@ ALL_FMTS=$(MINIMAL_FMTS) gtm.o gpsutil.o pcx.o cetus.o copilot.o \ ggv_log.o g7towin.o garmin_gpi.o lmx.o random.o xol.o dg-100.o \ navilink.o mtk_logger.o ik3d.o osm.o destinator.o exif.o vidaone.o \ igo8.o gopal.o humminbird.o mapasia.o gnav_trl.o navitel.o ggv_ovl.o \ - geotagger.o + jtr.o FMTS=@FMTS@ @@ -504,8 +504,6 @@ geoniche.o: geoniche.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ jeeps/gpsproj.h garmin_tables.h -geotagger.o: geotagger.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \ - zlib/zconf.h gbfile.h cet.h cet_util.h csv_util.h ggv_log.o: ggv_log.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \ zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h grtcirc.h \ jeeps/gpsmath.h jeeps/gps.h jeeps/../defs.h jeeps/gpsport.h \ @@ -588,6 +586,8 @@ internal_styles.o: internal_styles.c defs.h config.h queue.h gbtypes.h \ interpolate.o: interpolate.c defs.h config.h queue.h gbtypes.h \ zlib/zlib.h zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h \ filterdefs.h grtcirc.h +jtr.o: jtr.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \ + zlib/zconf.h gbfile.h cet.h cet_util.h csv_util.h kml.o: kml.c defs.h config.h queue.h gbtypes.h zlib/zlib.h zlib/zconf.h \ gbfile.h cet.h cet_util.h inifile.h xmlgeneric.h grtcirc.h lmx.o: lmx.c defs.h config.h queue.h gbtypes.h zlib/zlib.h zlib/zconf.h \ diff --git a/geotagger.c b/jtr.c similarity index 89% rename from geotagger.c rename to jtr.c index 7f08ad02b..7b1413dd2 100644 --- a/geotagger.c +++ b/jtr.c @@ -28,10 +28,10 @@ #include "csv_util.h" #include "avltree.h" -#define MYNAME "geotagger" +#define MYNAME "jtr" static -arglist_t geotagger_args[] = { +arglist_t jtr_args[] = { ARG_TERMINATOR }; @@ -39,7 +39,7 @@ static gbfile *fin, *fout; static avltree_t *trkpts; static time_t -geotagger_parse_time(const char *str, struct tm *tm, int *micro) +jtr_parse_time(const char *str, struct tm *tm, int *micro) { long int hms; char *dot; @@ -60,7 +60,7 @@ geotagger_parse_time(const char *str, struct tm *tm, int *micro) } static time_t -geotagger_parse_date(const char *str, struct tm *tm) +jtr_parse_date(const char *str, struct tm *tm) { int dmy = atoi(str); @@ -80,21 +80,21 @@ geotagger_parse_date(const char *str, struct tm *tm) *******************************************************************************/ static void -geotagger_rd_init(const char *fname) +jtr_rd_init(const char *fname) { fin = gbfopen(fname, "r", MYNAME); trkpts = avltree_init(0, MYNAME); } static void -geotagger_rd_deinit(void) +jtr_rd_deinit(void) { avltree_done(trkpts); gbfclose(fin); } static void -geotagger_read(void) +jtr_read(void) { char *str; int line = 0; @@ -135,7 +135,7 @@ geotagger_read(void) switch(column) { case 0: break; /* GEOTAG2 */ - case 1: geotagger_parse_time(str, &tm, µs); break; + case 1: jtr_parse_time(str, &tm, µs); break; case 2: valid = *str; break; case 3: lat = ddmm2degrees(atof(str)); break; case 4: if (*str == 'S') lat *= -1; break; @@ -143,7 +143,7 @@ geotagger_read(void) case 6: if (*str == 'W') lon *= -1; break; case 7: speed = KNOTS_TO_MPS(atof(str)); break; case 8: course = atof(str); break; - case 9: geotagger_parse_date(str, &tm); break; + case 9: jtr_parse_date(str, &tm); break; case 13: mcourse = atof(str); break; case 14: mdev = atof(str); break; case 15: mdevdir = *str; break; @@ -196,19 +196,19 @@ geotagger_read(void) } static void -geotagger_wr_init(const char *fname) +jtr_wr_init(const char *fname) { fout = gbfopen(fname, "wb", MYNAME); } static void -geotagger_wr_deinit(void) +jtr_wr_deinit(void) { gbfclose(fout); } static void -geotagger_trkpt_disp_cb(const waypoint *wpt) +jtr_trkpt_disp_cb(const waypoint *wpt) { char *str, *tmp; char stime[10], sdate[7], scourse[6], sspeed[8]; @@ -257,28 +257,28 @@ geotagger_trkpt_disp_cb(const waypoint *wpt) } static void -geotagger_write(void) +jtr_write(void) { - track_disp_all(NULL, NULL, geotagger_trkpt_disp_cb); + track_disp_all(NULL, NULL, jtr_trkpt_disp_cb); } /**************************************************************************/ -ff_vecs_t geotagger_vecs = { +ff_vecs_t jtr_vecs = { ff_type_file, { ff_cap_none, /* waypoints */ ff_cap_read | ff_cap_write, /* tracks */ ff_cap_none /* routes */ }, - geotagger_rd_init, - geotagger_wr_init, - geotagger_rd_deinit, - geotagger_wr_deinit, - geotagger_read, - geotagger_write, + jtr_rd_init, + jtr_wr_init, + jtr_rd_deinit, + jtr_wr_deinit, + jtr_read, + jtr_write, NULL, - geotagger_args, + jtr_args, CET_CHARSET_ASCII, 0 /* ascii is the expected character set */ /* not fixed, can be changed through command line parameter */ }; diff --git a/vecs.c b/vecs.c index a6f48b0f1..87b86ba0b 100644 --- a/vecs.c +++ b/vecs.c @@ -148,7 +148,7 @@ extern ff_vecs_t gnav_trl_vecs; extern ff_vecs_t navitel_trk_vecs; extern ff_vecs_t ggv_ovl_vecs; #if CSVFMTS_ENABLED -extern ff_vecs_t geotagger_vecs; +extern ff_vecs_t jtr_vecs; #endif static @@ -849,7 +849,7 @@ vecs_t vec_list[] = { }, #if CSVFMTS_ENABLED { - &geotagger_vecs, + &jtr_vecs, "jtr", "Jelbert GeoTagger data file", "jtr" -- 2.30.2